package com.jia.controller;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jia.pojo.User;
import com.jia.service.FindUser;
import com.jia.service.impl.FindUserImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Controller
@RequestMapping("/find")
public class DemoController {
    @Autowired
    private FindUser findUser;
    @Secured("ROLE_ADMIN")
    @RequestMapping("/showuser")
    public String showUser(){
        return "redirect:/ShowFIndDate.html";
    }
    @ResponseBody
    @RequestMapping("/showerror")
    public String showerror(){
        return "登录失败";
    }
//    @ResponseBody
//    @RequestMapping("/data")
//    public List<User> showdata(){
//        List<User> user = findUser.findUser();
//        System.out.println(user);
//        return user;
//    }

}
